package com.yunqiao.service.api;

import cn.hutool.core.lang.Dict;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yunqiao.common.utils.PageUtils;
import com.yunqiao.service.api.entity.ApplyDriverEntity;
import com.yunqiao.service.api.entity.UserEntity;
import com.yunqiao.service.api.form.Login;
import com.yunqiao.service.api.vo.UserVo;

import java.util.List;
import java.util.Map;

/**
 * 用户表
 *
 * @author Crocutax
 * @email wangxw725@163.com
 * @date 2019-03-02 15:03:56
 */
public interface UserService extends IService<UserEntity> {

    PageUtils queryPage(Map<String, Object> params);

    List<UserVo> getSuperiorUserUser(Long superiorUserId);

    void depositRefund(Long id) throws Exception;

    void applyDriver(ApplyDriverEntity applyDriver);

    ApplyDriverEntity getApplyDriverDetails(Long userId);

    void driverOff(Long id);

    Integer driverOpen(Long id);

    UserEntity details(Long id);

    List<Dict> getPosition();

    UserEntity auth(String openId);

    UserEntity qqAuth(String openId);

    void agent(Long id);

    void refuse(UserEntity userEntity);

    /**
     * 定时任务， 将订单冻结金额转到账户中
     */
	void dealOrderMoney();
    /**
     * 用户登录
     * @param form    登录表单
     * @return        返回登录信息
     */
    UserEntity Wxlogin(Login form);

    /**
     * 根据手机号 或者 阿里的opengId 查询 是否注册
     * @param phone
     * @param openId
     * @return
     */
    UserEntity findByPhoneOrOpendId(String phone,String openId);
}

